package com.dowsure.apisaas.enums;

public enum WebhookNoticeTypeEnum {

    OFFER_SENT_NOTIFY("OFFER_SENT_NOTIFY", "offer发送通知"),
    PUSH_NOTIFY("PUSH_NOTIFY", "流量推送通知"),
    PLATFORM_ACCOUNT_LOCK_NOTIFY("PLATFORM_ACCOUNT_LOCK_NOTIFY", "平台账户锁定通知"),
    PAYMENT_FORCE_REPAY_NOTIFY("PAYMENT_FORCE_REPAY_NOTIFY", "支付公司强制划扣结果通知"),
    CANCEL_FORCE_REPAY_NOTIFY("CANCEL_FORCE_REPAY_NOTIFY", "撤销强制划扣结果通知")
    ;

    private String value;

    private String describe;

    WebhookNoticeTypeEnum(String value, String describe){
        this.value = value;
        this.describe = describe;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }

    public static WebhookNoticeTypeEnum fromValue(String text) {
        for (WebhookNoticeTypeEnum b : WebhookNoticeTypeEnum.values()) {
            if (String.valueOf(b.value).equals(text)) {
                return b;
            }
        }
        return null;
    }
}
